//app.js
var utils = require('utils/util.js');
App({
  onLaunch: function () {
    // 登录
    wx.login({
      success: res => {
          console.log(res);
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
          utils.http("/api/v1/login/index_wx", { js_code:res.code},function(res){
              console.log(res);
          })
      }
    })
     
  },
  globalData: {
    userInfo: null,
    http:"http://xinong.qidian2018.com/index.php/"
  }
})